function [all_rb_1,all_wind_1]=DELallrbwind(all_rb,all_wind)

%% 1000Myr delete data whose max time is larger than DELtmax
global minLx  CHAbeamingFlag eddfac
DELtmax=200;
if(eddfac<1d4)
    eddfac
end
if(CHAbeamingFlag)
    fprintf(' beaming factor changed here')
end
all_wind(:,20)=all_wind(:,8)-all_wind(:,7);
all_rb(:,20)=all_rb(:,8)-all_rb(:,7);

all_wind_1=all_wind;
all_wind_1(all_wind_1(:,7)>DELtmax,:)=[];
all_rb_1=all_rb;
all_rb_1(all_rb_1(:,7)>DELtmax,:)=[];
%% change beaming factor
if(CHAbeamingFlag)
    all_rb_1(:,3)=all_rb_1(:,3).*all_rb_1(:,17);
    all_rb_1(:,17)=getBeaming( 2,all_rb_1(:,16));
    all_rb_1(:,3)=all_rb_1(:,3)./all_rb_1(:,17);
end

%% EDD factor
beaming_ori=all_rb_1(all_rb_1(:,16)>eddfac,17);
all_rb_1(all_rb_1(:,16)>eddfac,17)=getBeaming( 1,eddfac);
all_rb_1(all_rb_1(:,16)>eddfac,3)=all_rb_1(all_rb_1(:,16)>eddfac,3)...
    .*beaming_ori./all_rb_1(all_rb_1(:,16)>eddfac,17);
% all_rb_1(all_rb_1(:,16)>eddfac,:)=[];
%% delete data whose mass1 is smaller than 2Msun , unstable

all_rb_1(all_rb_1(:,11)<2,:)=[];
% all_rb_1(all_rb_1(:,9)<2,:)=[];

%% sht try delete data whose  \delta T is small

% all_rb_1(all_rb_1(:,20)<1,:)=[];

%% orbit is 0
all_rb_1(all_rb_1(:,14)==0,:)=[];
all_wind_1(all_wind_1(:,14)==0,:)=[];
%% \delta T <0
all_rb_1(all_rb_1(:,20)<0,:)=[];
all_wind_1(all_wind_1(:,20)<0,:)=[];
%% Lx is lower than Lxmin
all_rb_1(all_rb_1(:,3)<=10^minLx,:)=[];
all_wind_1(all_wind_1(:,3)<=10^minLx,:)=[];
% all_rb_1(all_rb_1(:,9)<3,:)=[];
%% delete all mass ratio is larger than 3
% all_rb_1(all_rb_1(:,11)./all_rb_1(:,12)>3,:)=[];
% all_rb_1(all_rb_1(:,9)<2 & all_rb_1(:,16)>10,:)=[];
%% change the function of Lx
% all_rb_1(:,3)=0.1*(3.0d8)^2*all_rb_1(:,18)*Msun*1d7/yearsc;
% all_wind_1(:,3)=0.1*(3.0d8)^2*all_wind_1(:,18)*Msun*1d7/yearsc;

%% delete all eddfac larger than ???
% all_rb_1(all_rb_1(:,16)>=50,:)=[];
end